import React from "react";
import { Navigate, Routes, Route } from "react-router-dom";
import { Login } from "./pages/Login";
import { Register } from "./pages/Register";
import { StudentHome } from "./pages/Home/StudentHome";
import { StaffHome } from "./pages/Home/StaffHome";
import { AdminHome } from "./pages/Home/AdminHome";
import { StudentModule } from "./pages/Modules/StudentModule";
import { StaffModule } from "./pages/Modules/StaffModule";
import { AdminModule } from "./pages/Modules/AdminModule";
import { ManageModule } from "./pages/Modules/ManageModule";
import { UserAdminstrator } from "./pages/user-administrator/UserAdministrator";
import { EnrollStudent } from "./components/EnrollStudent";
import { AppointTA } from "./components/AppointTA";
import AssignmentList from "./pages/staff-pages/assignment-list";
import QuestionList from "./pages/staff-pages/question-list";
import PairList from "./pages/staff-pages/pair-list";
import ParticipationList from "./pages/staff-pages/participation-list";
import StudentAssignmentList from "./pages/student-pages/assignment-list";
import StudentQuestionList from "./pages/student-pages/question-list";
import StudentGrading from "./pages/student-pages/grading";
import StudentViewFeedback from "./pages/student-pages/view-feedback";

export const Paths: React.FC = () => {
  return (
    <Routes>
      <Route path="/" element={<Navigate to="/login" />} />
      <Route path="/login" element={<Login />}></Route>
      <Route path="/register" element={<Register />}></Route>

      {/* Home Pages */}
      <Route path="/student/home" element={<StudentHome />}></Route>
      <Route path="/staff/home" element={<StaffHome />}></Route>
      <Route path="/admin/home" element={<AdminHome />}></Route>

      {/* Module Pages */}
      <Route path="/student/module" element={<StudentModule />}></Route>
      <Route path="/staff/module" element={<StaffModule />}></Route>
      <Route path="/admin/module" element={<AdminModule />}></Route>
      <Route path="/staff/module/:id" element={<ManageModule />}></Route>
      <Route
        path="/staff/module/:id/students"
        element={<EnrollStudent />}
      ></Route>
      <Route
        path="/staff/module/:id/TAs"
        element={<AppointTA />}
      ></Route>
      <Route
        path="/staff/module/:id/assignments"
        element={<AssignmentList />}
      ></Route>
      <Route
        path="/staff/module/:id/assignments/:assignmentId/questions"
        element={<QuestionList />}
      ></Route>

      <Route
        path="/staff/module/:id/assignments/:assignmentId/pair"
        element={<PairList />}
      ></Route>

      <Route
        path="/staff/module/:id/assignments/:assignmentId/participation"
        element={<ParticipationList />}
      ></Route>

      <Route
        path="/student/module/:id/listAssignment"
        element={<StudentAssignmentList />}
      ></Route>

      <Route
        path="/student/module/:id/listAssignment/:assignmentId/listQuestion"
        element={<StudentQuestionList />}
      ></Route>

      <Route
        path="/student/assignment/:assignmentId/grading"
        element={<StudentGrading />}
      ></Route>

      <Route
        path="/student/assignment/:assignmentId/viewFeedback"
        element={<StudentViewFeedback />}
      ></Route>

      {/* User Administrator Pages */}
      <Route path="/admin/user" element={<UserAdminstrator />}></Route>
    </Routes>
  );
};
